<%--
  Created by IntelliJ IDEA.
  User: qintao30057
  Date: 2018/1/26
  Time: 9:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>项目管理</title>
    <%@ include file="../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
    <script>
        var searchInfo = ${searchInfo};
        var statusMap = ${statusMap}
        var bizEnumGroupMapCombo = ${bizEnumGroupMap}
        var bizCodeTypeMap = ${bizCodeTypeMap}
    </script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><i class="fa fa-search"></i> 筛选查询</h5>
                </div>
                <div class="ibox-content ibox-content-search">
                    <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                        <input type="hidden" name="groupCode"  id="groupCode" value="${not empty searchInfo ? searchInfo.groupCode : ''}">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">查询标签：</label>
                            <div class="col-sm-3">
                                <input type="text" name="enumName" onkeydown="if(event.keyCode==13){doRefresh();return false;}"
                                       id="enumName" class="form-control"  placeholder="输入标签名称" maxlength="30"
                                       value="${not empty searchInfo ? searchInfo.enumName : ''}">
                            </div>
                            <label class="col-sm-1 control-label">状态：</label>
                            <div class="col-sm-2">
                                <select class="form-control" name="status" id="status" onchange="doRefresh()">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${statusMap}" var="item">
                                        <c:if test="${item.key!='delete'}">
                                            <option value="${item.key}" ${not empty searchInfo && searchInfo.status == item.key ? 'selected' : '' } >${item.value}</option>
                                        </c:if>
                                    </c:forEach>
                                </select>
                            </div>
                            <label class="col-sm-1 control-label">类型：</label>
                            <div class="col-sm-2">
                                <select class="form-control" name="bizCode" id="bizCode" onchange="doRefresh()">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${bizCodeTypeMap}" var="item">
                                            <option value="${item.code}" ${not empty searchInfo && searchInfo.bizCode == item.code ? 'selected' : '' } >${item.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                            <div class="ibox-tools ibox-tools-search">
                                <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                <button type="button" class="btn btn-primary btn-outline" onclick="clearFrom('searchForm')">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><i class="fa fa-table"></i> 标签组</h5>
                </div>
                <div class="ibox-content">
                    <table class='table table-striped table-hover'
                           id="GroupdataTable"  data-height="400"
                           data-toggle="table"
                           data-url="${ctx}/bizEnum/pageFindGroupForBizEnumData?t=${now}"
                           data-pagination="true"
                           data-side-pagination="server"
                           data-striped="true"
                           data-response-handler="handleServerResult"
                           data-query-params-type=""
                           data-query-params="getGroupParams"
                           data-page-number="${not empty searchInfo.gpageNo ? searchInfo.gpageNo : 1}"
                           data-page-size="${not empty searchInfo.gpageNo ? searchInfo.gpageSize : defaultPageSize}"
                           data-page-list="${pageList}">
                        <thead>
                        <tr>
                            <th data-field="dictName"  data-align="center" data-width="90px">组名称</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
        <div class="col-sm-9">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><i class="fa fa-table"></i> 标签信息</h5>
                    <div class="ibox-tools col-sm-offset-2">
                        <c:if test="${userType == 'super' || not empty btnMap['addBizEnum']}">
                            <button class="btn btn-primary btn-outline" onclick="openAddBizEnumPage()">新增</button>
                        </c:if>
                        <c:if test="${userType == 'super' || not empty btnMap['editBizEnum']}">
                            <button class="btn btn-primary btn-outline" onclick="openEditBizEnumPage()">编辑</button>
                        </c:if>
                        <c:if test="${userType == 'super' || not empty btnMap['stateBizEnum']}">
                            <button class="btn btn-primary btn-outline change_text" onclick="changeState()">冻结</button>
                        </c:if>
                        <c:if test="${userType == 'super' || not empty btnMap['delBizEnum']}">
                            <button class="btn btn-primary btn-outline" onclick="doDeleteBizEnum()">删除</button>
                        </c:if>
                        <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class='table table-striped table-hover'
                           id="dataTable"  data-height="400"
                           data-toggle="table"
                           data-url="${ctx}/bizEnum/pageFindBizEnumData?t=${now}"
                           data-pagination="true"
                           data-side-pagination="server"
                           data-striped="true"
                           data-response-handler="handleServerResult"
                           data-query-params-type=""
                           data-query-params="getParams"
                           data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                           data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                           data-page-list="${pageList}">
                        <thead>
                        <tr>
                            <th data-field="id" data-align="center" data-width="80px">主键id</th>
                            <th data-field="status" data-formatter="formatStatus" data-align="center" data-width="80px">标签状态</th>
                            <th data-field="enumName" data-formatter="formatName" data-events="actionEvents" data-align="center" data-width="140px" >标签名称</th>
                            <th data-field="bizCode" data-align="center" data-formatter="formatBizName" data-width="140px" >标签类型</th>
                            <th data-field="labelState"  data-visible="false">标签说明</th>
                            <th data-field="labelImageUrl"  data-visible="false">标签说明图片url</th>
                            <th data-field="labelInstruction"  data-visible="false">说明的文字或链接</th>
                            <th data-field="sortNum" data-align="center" data-width="60px">排序</th>
                            <th data-field="gmtCreate"  data-formatter="formatTime" data-align="center" data-width="140px">创建时间</th>
                            <th data-field="creator" data-align="center" data-width="80px">创建人</th>
                            <th data-field="gmtModify" data-formatter="formatTime"  data-align="center" data-width="140px">最后编辑时间</th>
                            <th data-field="operator"  data-align="center" data-width="80px">编辑人</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="text-center">${companyName}</div>
        </div>
    </div>
</div>
<script src="${ctx}/js/bizEnum/bizEnumMgr.js?t=${now}"></script>
</body>
</html>

